package com.xcesys.extras.dataobject.security;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Authentication")
public class Authentication implements Serializable {

	private static final long serialVersionUID = -2498176639089660475L;

	/** An array of authorities of this authentication */
	private String[] authorities = null;

	/** Credential object(like password) of this authentication */
	private Object credentials = null;

	/** URL string value refers to remote destination. */
	private String destUrl = null;

	/** Additional information object of this authentication */
	private Object details = null;

	/** Flag represents whether this authentication is authenticated. */
	private boolean isAuthenticated;

	/** Principal object(like user name) of this authentication */
	private Object principal = null;

	public Authentication() {
	}

	public String[] getAuthorities() {
		return authorities;
	}

	public Object getCredentials() {
		return credentials;
	}

	public String getDestUrl() {
		return destUrl;
	}

	public Object getDetails() {
		return details;
	}

	public Object getPrincipal() {
		return principal;
	}

	public boolean isAuthenticated() {
		return isAuthenticated;
	}

	public void setAuthenticated(boolean isAuthenticated)
			throws IllegalArgumentException {
		this.isAuthenticated = isAuthenticated;
	}

	public void setAuthorities(String[] authorities) {
		this.authorities = authorities;
	}

	public void setCredentials(Object credentials) {
		this.credentials = credentials;
	}

	public void setDestUrl(String destUrl) {
		this.destUrl = destUrl;
	}

	public void setDetails(Object details) {
		this.details = details;
	}

	public void setPrincipal(Object principal) {
		this.principal = principal;
	}

}
